<template>
  <svg aria-hidden="true">
    <use :href="symbolId" :fill="color"></use>
  </svg>
</template>
<script setup lang="ts">
import {computed} from 'vue'

const props = defineProps({
  prefix: {
    type: String,
    default: 'icon'
  },
  name: {
    type: String,
    required: true,
  },
  color: {
    type: String
  }
})

const symbolId = computed(() => `#${props.prefix}-${props.name}`)

</script>
